<?php
/**
 * @Notes:【】
 * @User: zwc
 * @Date: 2022-05-14 0:17
 */

namespace App\Controller\User\Chat;

use App\Controller\User\BaseController;
use App\Middleware\AuthTokenMiddleware;
use App\Service\Chat\ChatSessionService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Middleware;
use Yj\Apidog\Annotation\ApiController;
use Yj\Apidog\Annotation\PostApi;


/**
 * @Notes:【】
 * @User: zwc
 * @Date: 2022-05-14 0:17
 * @Middleware(AuthTokenMiddleware::class)
 * @ApiController(prefix="user/chat/chat-session")
 */
class ChatSessionController extends BaseController
{

    /**
     * @Inject()
     * @var ChatSessionService
     */
    protected $chatSessionService;

    /**
     * @Notes:【】
     * @User: zwc
     * @Date: 2022-05-14 0:18
     * @PostApi(path="lists")
     */
    public function lists()
    {
        $userId = $this->getUid();
        $data = $this->chatSessionService->lists($userId);
        _SUCCESS($data);
    }
}